home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 26 / AACD 26.iso / AACD / System / xvs / developer / include / c / libraries / xvs.h
Encoding:
C/C++ Source or Header  |  2001-09-05  |  5.0 KB  |  148 lines

  1. #ifndef LIBRARIES_XVS_H
  2. #define LIBRARIES_XVS_H
  3.  
  4. /*
  5. **    $VER: xvs.h 33.16 (05.09.2001)
  6. **
  7. **    Copyright © 1998 by Georg Hörmann and Dirk Stöcker
  8. **    All Rights Reserved
  9. */
  10.  
  11. #ifndef EXEC_LIBRARIES_H
  12. #include <exec/libraries.h>
  13. #endif
  14.  
  15. #ifndef EXEC_LISTS_H
  16. #include <exec/lists.h>
  17. #endif
  18.  
  19. /************************************************************************
  20. * Library Base                                *
  21. ************************************************************************/
  22.  
  23. struct xvsBase {
  24.   struct Library    xvs_Lib;
  25.   UWORD            xvs_Reserved0;    /* PRIVATE */
  26.   ULONG            xvs_SegList;    /* PRIVATE */
  27.   struct DosLibrary *    xvs_DosBase;    /* may be used by application */
  28.   struct ExecBase *    xvs_ExecBase;    /* cached for fast access */
  29.   struct IntuitionBase *xvs_IntBase;    /* PRIVATE */
  30.   struct Device *    xvs_TrackBase;  /* PRIVATE */
  31.   struct Library *    xvs_RamLibBase;    /* PRIVATE */
  32. };
  33.  
  34. #define    XVS_VERSION        33    /* for OpenLibrary() */
  35. #define    XVS_NAME        "xvs.library"
  36.  
  37. /************************************************************************
  38. * Virus List                                *
  39. ************************************************************************/
  40.  
  41. struct xvsVirusList {
  42.   struct List    xvsvl_List;
  43.   UWORD        xvsvl_Count;    /* amount of entries */
  44. };
  45.  
  46. /* values for xvsVirusList->xvsl_List.lh_Type and xvsCreateVirusList() */
  47.  
  48. #define XVSLIST_BOOTVIRUSES    0x42
  49. #define XVSLIST_DATAVIRUSES    0x44
  50. #define XVSLIST_FILEVIRUSES    0x46
  51. #define XVSLIST_LINKVIRUSES    0x4C
  52.  
  53. /************************************************************************
  54. * Object Types                                *
  55. ************************************************************************/
  56.  
  57. #define XVSOBJ_BOOTINFO        1    /* xvsBootInfo structure */
  58. #define XVSOBJ_SECTORINFO    2    /* xvsSectorInfo structure */
  59. #define XVSOBJ_FILEINFO        3    /* xvsFileInfo structure */
  60. #define XVSOBJ_MEMORYINFO    4    /* xvsMemoryInfo structure */
  61. #define XVSOBJ_MAX        4    /* PRIVATE */
  62.  
  63. /************************************************************************
  64. * Bootblock Info                            *
  65. ************************************************************************/
  66.  
  67. struct xvsBootInfo {
  68.   APTR        xvsbi_Bootblock;    /* buffer holding bootblock */
  69.   STRPTR    xvsbi_Name;        /* description of bootblock */
  70.   UBYTE        xvsbi_BootType;        /* type of bootblock */
  71.   UBYTE        xvsbi_DosType;        /* dos type (eg. DOS0 -> 0) */
  72.   UBYTE        xvsbi_ChkSumFlag;    /* TRUE if checksum correct */
  73.   UBYTE        xvsbi_Reserved0;    /* PRIVATE */
  74. };
  75.  
  76. /* values for xvsBootInfo->xvsbi_BootType and xvsInstallBootblock() */
  77.  
  78. #define XVSBT_UNKNOWN        0    /* Unknown bootblock */
  79. #define XVSBT_NOTDOS        1    /* Not a DOS bootblock */
  80. #define XVSBT_STANDARD13    2    /* Standard bootblock (1.3) */
  81. #define XVSBT_STANDARD20    3    /* Standard bootblock (2.0) */
  82. #define XVSBT_VIRUS        4    /* xvsbi_Name = virus name */
  83. #define XVSBT_UNINSTALLED    5    /* ONLY xvsInstallBootblock() */
  84.  
  85. /************************************************************************
  86. * Sector Info                                *
  87. ************************************************************************/
  88.  
  89. struct xvsSectorInfo {
  90.   APTR        xvssi_Sector;        /* buffer holding sector */
  91.   ULONG        xvssi_Key;        /* sector number */
  92.   STRPTR    xvssi_Name;        /* description of sector */
  93.   UBYTE     xvssi_SectorType;    /* type of sector */
  94.   UBYTE     xvssi_InternalType;    /* PRIVATE */
  95. };
  96.  
  97. /* values for xvsSectorInfo->xvssi_SectorType */
  98.  
  99. #define XVSST_UNKNOWN        0    /* Unknown sector */
  100. #define XVSST_DESTROYED        1    /* xvssi_Name = virus name */
  101. #define XVSST_INFECTED        2    /* xvssi_Name = virus name */
  102.  
  103. /************************************************************************
  104. * File Info                                *
  105. ************************************************************************/
  106.  
  107. struct xvsFileInfo {
  108.   APTR        xvsfi_File;        /* buffer holding whole file */
  109.   ULONG        xvsfi_FileLen;        /* length of file */
  110.   STRPTR    xvsfi_Name;        /* description of file */
  111.   UBYTE        xvsfi_FileType;        /* type of file */
  112.   UBYTE        xvsfi_ModifiedFlag;    /* TRUE if file was modified */
  113.   UBYTE        xvsfi_ErrorCode;    /* only for xvsRepairFile() */
  114.   UBYTE        xvsfi_InternalType;    /* PRIVATE */
  115.   APTR        xvsfi_Fixed;        /* start of fixed file */
  116.   ULONG        xvsfi_FixedLen;        /* length of fixed file */
  117. };
  118.  
  119. /* values for xvsFileInfo->xvsfi_FileType */
  120.  
  121. #define XVSFT_EMPTYFILE        1    /* Empty file */
  122. #define XVSFT_DATAFILE        2    /* Data file */
  123. #define XVSFT_EXEFILE        3    /* Executable file */
  124. #define XVSFT_DATAVIRUS        4    /* xvsfi_Name = virus name */
  125. #define XVSFT_FILEVIRUS        5    /* xvsfi_Name = virus name */
  126. #define XVSFT_LINKVIRUS        6    /* xvsfi_Name = virus name */
  127.  
  128. /* values for xvsFileInfo->xvsfi_ErrorCode */
  129.  
  130. #define XVSERR_WRONGFILETYPE    1    /* Wrong type of file */
  131. #define XVSERR_FILETRUNCATED    2    /* File truncated */
  132. #define XVSERR_UNSUPPORTEDHUNK    3    /* Unsupported hunk */
  133. #define XVSERR_UNEXPECTEDDATA    4    /* Unexpected data */
  134. #define XVSERR_OUTOFMEMORY    5    /* Out of memory */
  135. #define XVSERR_NOTIMPLEMENTED    6    /* (V33.15) Not implemented yet */
  136.  
  137. /************************************************************************
  138. * Memory Info                                *
  139. ************************************************************************/
  140.  
  141. struct xvsMemoryInfo {
  142.   UWORD        xvsmi_Count;        /* amount of detected viruses */
  143.   UWORD        xvsmi_Reserved0;    /* PRIVATE */
  144.   STRPTR    xvsmi_NameArray[5];    /* names of viruses */
  145. };
  146.  
  147. #endif /* LIBRARIES_XVS_H */
  148.